//
//  WPDetectionResultTopTableViewCell.m
//  health
//
//  Created by apple on 2021/11/10.
//  Copyright © 2021 zglee. All rights reserved.
//

#import "MJTotalCholesResultICell1.h"

@interface MJTotalCholesResultICell1 ()
@property (weak, nonatomic) IBOutlet UILabel *itemTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *abbrLabel;

@property (weak, nonatomic) IBOutlet UILabel *evaluationTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *evaluationValueLabel;

@property (weak, nonatomic) IBOutlet UILabel *gradeTitleLabel;
@property (weak, nonatomic) IBOutlet UILabel *gradeLabel;

@property (weak, nonatomic) IBOutlet UIView *lineView;
@property (weak, nonatomic) IBOutlet GradientRampView *gradientRampView;

@end

@implementation MJTotalCholesResultICell1

- (void)awakeFromNib {
    [super awakeFromNib];
    
  

}

- (void)layoutSubviews {
    [super layoutSubviews];
    
//    [self.lineImageView.superview layoutIfNeeded];
//    [self.lineImageView mj_cornerWithType:MJCornerRadiusTypeLeft cornerRadius:30];
//    [self.lineView mj_cornerRadius:15];
}

- (void)setTotalCholesterolModel:(MJTotalCholesterolModel *)totalCholesterolModel {
    _totalCholesterolModel = totalCholesterolModel;
    
    self.gradientRampView.type = DetectionItemTypeTC;
    self.gradientRampView.titleArray = @[@"Low",@"MR",@"HR",@"VHR"];
    
    self.gradientRampView.index = [HealthHelper getTCGradeInteger:@"MR"];
    
    self.abbrLabel.text = @"TC";
    self.evaluationTitleLabel.mj_localizable = @"TC Diagnosis";
    self.evaluationValueLabel.mj_localizable = @"Borderline-High Level";
    self.gradeTitleLabel.mj_localizable = @"Cardiovascular Risk Prediction";
    self.gradeLabel.mj_localizable = @"High Risk";
}

- (void)setBloodSugarModel:(MJBloodSugarModel *)bloodSugarModel {
    _bloodSugarModel = bloodSugarModel;
    
    self.gradientRampView.type = DetectionItemTypeGlu;
    self.gradientRampView.titleArray = @[@"Hypo",@"Normal",@"Prediabetes",@"Diabetes",@"DKA"];
    self.gradientRampView.index = [HealthHelper getGluGradeInteger:@"Normal"];
    
    self.abbrLabel.text = @"Glu";
    self.evaluationTitleLabel.mj_localizable = @"BG Diagnosis";
    self.evaluationValueLabel.mj_localizable = @"Borderline-High Level";
    self.gradeTitleLabel.mj_localizable = @"BG Prediction";
    self.gradeLabel.mj_localizable = @"High Risk";
    
}

- (void)setHemoglobinModel:(MJHemoglobinModel *)hemoglobinModel {
    _hemoglobinModel = hemoglobinModel;
    
    self.gradientRampView.type = DetectionItemTypeHB;
    self.gradientRampView.titleArray = @[@"Min",@"Low",@"MR",@"HR",@"VHR"];
    
    self.gradientRampView.index = [HealthHelper getHBGradeInteger:@"Low"];
    
    self.abbrLabel.text = @"HB";
    self.evaluationTitleLabel.mj_localizable = @"Anemia Severity Diagnosis";
    self.evaluationValueLabel.mj_localizable = @"Borderline-High Level";
    self.gradeTitleLabel.mj_localizable = @"Anemia Risk Prediction";
    self.gradeLabel.mj_localizable = @"High Risk";
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}


@end
